package com.zhijiaoyun.service;

import com.zhijiaoyun.model.LearnHistory;
import com.zhijiaoyun.model.dto.CourseHistoryDto;
import com.zhijiaoyun.model.dto.LearnHistoryDto;
import com.zhijiaoyun.model.dto.PageList;

import java.util.List;
import java.util.Map;

/**
 * @author shisfish
 * @date 2017/6/6
 */
public interface ILearnHistoryService {

    PageList<LearnHistory> getLearnHistoryByParams(Integer pageIndex, String username, String coursename);

    List<LearnHistory> pageLearnHistoryByUserId(Integer pageIndex, Long userId);

    List<LearnHistory> getLearnHistoryByCourseIdUserId(Long courseId, Long userId);

    void addLearnHistory(LearnHistory learnHistory);

    LearnHistory getLearnHistoryByLessonIdUserId(Long lessonId, Long userId);

    PageList<LearnHistory> pageLearnHistoryByParams(Integer pageIndex, Long userId, Long courseId);

    void modifyLearnHistory(LearnHistory learnHistory);

    List<LearnHistoryDto> getLearnHistoryDtoByParams(Long userId, Long courseId);

    PageList<CourseHistoryDto> pageCourseHistoryDtoByParams(Integer pageIndex, Long userId);

    List<CourseHistoryDto> getCourseHistoryDtoByParams(Integer pageIndex, Long userId);

    PageList<CourseHistoryDto> pageCourseHistoryDtoByParams(int pageIndex, int pageSize, long userId);

    /**
     * 获得一级学习记录
     *
     * @param pageIndex
     * @param pageSize
     * @param userId
     * @return
     */
    Map<String, Object> pageCourseHistoryDtoByUserId(int pageIndex, int pageSize, long userId);

    /**
     * 获得二级学习记录
     *
     * @param userId
     * @param courseId
     * @return
     */
    Map<String, Object> listLearnHistoryDtoByCourseIdUserId(long userId, long courseId);
}
